<route lang="json5" type="home">
{
  layout: 'default',
  style: {
    navigationStyle: 'custom',
    navigationBarTitleText: '',
  },
}
</route>

<template>
  <view class="bg-#f8f8f8 h-100vh">
    <view>
      <img
        src="https://img-shop.qmimg.cn/s23107/2020/04/26/3eb7808bf105262604.jpg"
        class="w-750rpx h-538rpx"
      />
      <view class="absolute top-0rpx p-30rpx">
        <view class="color-white leading-60rpx">你好，{{ asd }}</view>
        <view class="font-size-25rpx color-white">一杯奶茶，一口软欧包，在奈雪遇到两种美好</view>
      </view>
    </view>
    <view class="w-700rpx left-25rpx mt--90rpx z-30 absolute">
      <view class="w-700rpx h-166rpx bg-white rounded-10rpx py-30rpx overflow-hidden mb-30rpx">
        <view class="w-350rpx h-166rpx float-left text-center font-bold color-#777" @click="tpzq()">
          <view>
            <img src="../../static/images/index/zq.png" class="w-86rpx h-86rpx m-10rpx" />
          </view>
          <view>自取</view>
        </view>
        <view class="w-350rpx h-166rpx float-left text-center font-bold color-#777">
          <view>
            <img src="../../static/images/index/wm.png" class="w-86rpx h-86rpx m-10rpx" />
          </view>
          <view>外卖</view>
        </view>
      </view>
      <view class="w-640rpx bg-white h-92rpx rounded-10rpx p-30rpx overflow-hidden mb-30rpx">
        <view class="float-left w-568rpx h-92rpx">
          <view class="h-52rpx">
            <text class="inline-block">我的积分</text>
            <text class="font-bold font-size-45rpx inline-block">411</text>
          </view>
          <view class="h-40rpx">
            <text class="color-#ccc font-size-24rpx">进入积分商城兑换奈雪券及周边好礼 &gt;</text>
          </view>
        </view>
        <view class="float-left w-72rpx h-92rpx" @click="tpvip()">
          <view>
            <img src="../../static/images/index/qrcode.png" class="w-40rpx h-40rpx m-10rpx" />
          </view>
          <view class="font-size-20rpx color-#ADB838">会员码</view>
        </view>
      </view>
      <view class="w-660rpx h-280rpx bg-white p-20rpx overflow-hidden mb-30rpx">
        <view class="float-left w-340rpx h-280rpx bg-#F2F2E6 mr-20rpx overflow-hidden">
          <view class="float-left mt-20rpx ml-20rpx">
            <img src="../../static/images/index/csc.png" class="w-30rpx h-30rpx" />
          </view>
          <view class="float-left mt-20rpx ml-5rpx">
            <view class="font-size-30rpx">奈雪的茶商城</view>
            <view class="font-size-20rpx color-#919293">优质茶礼盒，网红零食</view>
          </view>
          <view>
            <img
              src="../../static/images/index/yzclh.png"
              class="h-128rpx w-224rpx ml-120rpx mt-60rpx"
            />
          </view>
        </view>
        <view class="float-left w-300rpx h-260rpx">
          <view class="w-300rpx h-130rpx mb-20rpx bg-#FDF3F2 overflow-hidden" @click="tptea()">
            <view class="mt-40rpx ml-20rpx float-left">
              <img src="../../static/images/index/mcsb.png" class="w-30rpx h-30rpx" />
              <text class="font-size-25rpx ml-3rpx">买茶送包</text>
            </view>
            <view class="float-right mt-10rpx">
              <img src="../../static/images/index/mcsb_bg.png" class="w-120rpx h-120rpx" />
            </view>
          </view>
          <view class="w-300rpx h-130rpx bg-#FCF6D4 overflow-hidden">
            <view class="mt-40rpx ml-20rpx float-left">
              <img src="../../static/images/index/hyjb.png" class="w-30rpx h-30rpx" />
              <text class="font-size-25rpx ml-3rpx">会员卷包</text>
            </view>
            <view class="float-right mt-10rpx">
              <img src="../../static/images/index/hyjb_bg.png" class="w-120rpx h-120rpx" />
            </view>
          </view>
        </view>
      </view>
      <view class="w-700rpx overflow-hidden">
        <view class="overflow-hidden">
          <view class="font-bold float-left leading-54rpx">会员新鲜事</view>
          <view class="float-right">
            <img src="../../static/images/index/arrow-right.png" class="w-54rpx h-54rpx" />
          </view>
        </view>
        <view>
          <img
            src="https://img-shop.qmimg.cn/s23107/2020/04/27/0039bf41c9ebd50a2c.jpg"
            class="w-700rpx h-200rpx"
          />
        </view>
        <view class="color-white font-size-35rpx relative top--70rpx left-20rpx">
          "梅"你不行 | 霸气杨梅清爽回归
        </view>
      </view>
      <view class="h-80rpx w-700rpx"></view>
    </view>
  </view>
</template>

<script lang="ts" setup>
import { ref } from 'vue'
let asd = ref('游客')
onShow(() => {
  let value = uni.getStorageSync('token')
  if (value) {
    console.log(value)
    asd.value = value
  } else {
  }
})
const tptea = () => {
  uni.navigateTo({
    url: '/pages/invite/invite',
  })
}
const tpzq = () => {
  let value = uni.getStorageSync('token')
  if (value) {
    uni.switchTab({
      url: '/pages/List/list',
    })
  }
}
const tpvip = () => {
  uni.navigateTo({
    url: '/pages/mvip/mvip',
  })
}
</script>

<style lang="scss" scoped></style>
